<?php 

?>
<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title>成绩查询</title>
	<!-- <link rel="stylesheet" href="../style/score.css"> -->
</head>
<body>
	<!-- 最大的盒子 -->
 <div id="wrapper_score">
	 <div id="header_score">
		 <h2>成绩查询</h2>
	 </div>
	 
	 <div id="center_score">
		<div id="score_title">
			<span>考试名称</span>
			<span>考试时间</span>
			<span>考生学号</span>
			<span>语文</span>
			<span>数学</span>
			<span>英语</span>
			<span>综合</span>
		</div>
		<!-- <div class="mini_title">
			<span>考试名称</span>
			<span>考试时间</span>
			<span>考生学号</span>
			<span>语文</span>
			<span>数学</span>
			<span>英语</span>
			<span>综合</span>
		</div> 这些代码用php写-->
		<?php 
		include 'mysql.php';
		$name = @$_POST['name'];
		$PWD = @$_POST['password'];
		if($name != '' && $PWD != '')
		{
			// 如果有空，可以在此处写上查询账号和密码是否存在的SQL
			$sql_1 = "select * from score where studentID = $name";
			$result = mysqli_query($link,$sql_1);
			while($rows = mysqli_fetch_assoc($result))
			{
				echo '<div class="mini_title">';
				echo '<span>'.$rows['score_title'].'</span>';
				echo '<span>'.$rows['time'].'</span>';
				echo '<span>'.$rows['studentID'].'</span>';
				echo '<span>'.$rows['Chinese'].'</span>';
				echo '<span>'.$rows['Mathematics'].'</span>';
				echo '<span>'.$rows['English'].'</span>';
				echo '<span>'.$rows['other'].'</span>';
				echo '</div>';
			}
		}
		else
		{
			echo "你无权访问此网页";
		}
		
		
		?>
		
	 </div>
	
	
	
 </div>	
 <!-- HTML代码到此结束 -->
</body>
</html>